mod proto_test;

pub use proto_test::*;

impl Person {
    pub fn new(
        name: impl Into<String>,
        id: i32,
        email: impl Into<String>,
        phones: impl Into<Vec<PhoneNumber>>,
    ) -> Self {
        Self {
            name: name.into(),
            id,
            email: email.into(),
            data: Default::default(),
            metadata: Default::default(),
            phones: phones.into(),
        }
    } 
}

impl PhoneNumber {
    pub fn new(number: impl Into<String>, py: PersonType) -> Self {
        Self {
            number: number.into(),
            phone_type: py.into(),  //phone_type 为i32类型
        }
    }
}